from PyQt5.QtWidgets import QWidget,QLineEdit,QPushButton,QApplication,QHBoxLayout,QFormLayout
import sys
class SpellPage(QWidget):
    def __init__(self):
        super(SpellPage, self).__init__()
        self.setWindowTitle('拼写')
        self.spell_line = QLineEdit(self)
        self.confirm_button = QPushButton('confirm',self)
        self.layout = QHBoxLayout()

        self.layout_init()

    def layout_init(self):
       self.layout.addWidget(self.spell_line)
       self.layout.addWidget(self.confirm_button)
       self.setLayout(self.layout)
if __name__ == '__main__':
    app = QApplication(sys.argv)
    page = SpellPage()
    page.show()
    sys.exit(app.exec())